function TabObj(sTabName, oLabels)
{
	this.TabName		= sTabName;
	this.Labels			= oLabels; // an array of LocalizedObjs
}


function SectionObj(sTabName, sSectionName, bShowLabel, bShowBar, oLabels)
{
	this.TabName		= sTabName;
	this.SectionName	= sSectionName;
	this.ShowLabel		= bShowLabel;
	this.ShowBar		= bShowBar;
	this.Labels			= oLabels; // an array of LocalizedObjs
}


function FieldObj(sTabName, sSectionName, sFieldName, sFieldLocName, sFieldDesc, sDataType, bRequired, sOrgRequired, bSpan, oDisplayNames, oLabels, oOptions, oEvents, oPropertyBag)
{
	this.TabName		= sTabName;
	this.SectionName	= sSectionName;
	this.FieldName		= sFieldName;
	this.FieldLocName	= sFieldLocName;
	this.FieldDesc		= sFieldDesc;
	this.DataType		= sDataType;
	this.Required		= bRequired;
	this.OrgRequired	= sOrgRequired;
	this.Span			= bSpan;
	this.DisplayNames	= oDisplayNames; // an array of LocalizedObjs
	this.Labels			= oLabels; // an array of LocalizedObjs
	this.Options		= oOptions; // an array of OptionObjs
	this.Events			= oEvents;		// an array of events
	this.PropertyBag	= oPropertyBag; // an specialized object of properties
}


// this is used to store labels and displaynames
//
function LocalizedObj(sDescription, sLanguageCode)
{
	this.Description	= sDescription;
	this.LanguageCode	= sLanguageCode;
}


function OptionObj(iValue, oLabels)
{
	this.Value			= iValue;
	this.Labels			= oLabels; // an array of LocalizedObjs
}


function StateStatusObj(iValue, iStateOrDefaultStatus, oLabels)
{
	this.Value					= iValue;
	this.StateOrDefaultStatus	= iStateOrDefaultStatus;
	this.Labels					= oLabels; // an array of LocalizedObjs
}

function EventObj(sName, bActive, bApplication, sScript, oDependencies)
{
	this.Name			= sName;			// name of the script
	this.Active			= bActive;			// enabled/disabled
	this.Application	= bApplication;		// Application Event/Custom Event
	this.Script			= sScript;			// the user-entered script body
	this.Dependencies	= oDependencies;	// an array of Dependencies
}

function PicklistPropertyBag(iNextValue, iDefaultValue)
{
	this.NextValue		= iNextValue;
	this.DefaultValue	= iDefaultValue;
}

function StatusPropertyBag(iNextValue, oStates, oStatuses)
{
	this.NextValue	= iNextValue;
	this.States		= oStates; // an array of StateStatusObjs
	this.Statuses	= oStatuses; // an array of StateStatusObjs
}

function TextPropertyBag(sFormat, iMaxLength, iOrgMaxLength)
{
	this.Format			= sFormat;
	this.MaxLength		= iMaxLength;
	this.OrgMaxLength	= iOrgMaxLength;
}


function MemoPropertyBag(iMaxLength, iOrgMaxLength)
{
	this.MaxLength		= iMaxLength;
	this.OrgMaxLength	= iOrgMaxLength;
}


function DatetimePropertyBag(sFormat, sDefaultValue)
{
	this.Format			= sFormat;
	this.DefaultValue	= sDefaultValue;
}


function NumberPropertyBag(iMinValue, iMaxValue, iAccuracy, bGrouping)
{
	this.MinValue		= iMinValue;
	this.MaxValue		= iMaxValue;
	this.Accuracy		= iAccuracy;
	this.Grouping		= bGrouping;
}

function LookupPropertyBag(sLookupStyle, sLookupClass)
{
	this.LookupStyle	= sLookupStyle;
	this.LookupClass	= sLookupClass;
}

